<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.util.*"%>
<%@page import="imageviewer.beans.OverViewBean"%>
<%@page import="imageviewer.domain.Picture"%>
<%
	OverViewBean viewBean = (OverViewBean) request.getAttribute("OverViewBean");
%>
<html>
<head>
	<%@ include file="Head.jsp" %>
</head>
<body>
	<%@include file="Top.jsp" %>
	<div id="content">
	<table>
		<form action="/ImageViewer/servlet/Image" method="post">
		<tr>
			<td><input type="submit" value="Neue Suche"/></td>
		</tr>
		</form>
	</table>

	<table>
		<tr>
			<th>Bild Name</th>
			<th>Datum</th>
			<th>Uhrzeit</th>
			<th>Kamera</th>
			<th>Bild</th>
		</tr>
		<%for(int i = 0;i<viewBean.getPictures().size();i++) { 
			Picture pic = viewBean.getPictures().get(i);
		%>
			<tr>
				<td><%= pic.getName() %></td>
				<td><%= pic.getDate() %></td>
				<td><%= pic.getTime() %></td>
				<td><%= pic.getCamera().getCameraName() %></td>
				<td><a href="<%="/ImageViewer/servlet/Picture?id="+pic.getPicDataId() %>" target="_blank"><img src="<%="/ImageViewer/servlet/Thumbnail?path="+pic.getPath()%>"></a></td>
			</tr>
		<%} %>
	</table>
	</div>
</body>
</html>